﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ParboiledSharp.lang.roboline.context;

namespace ParboiledSharp.lang.roboline.ast
{
    class Add : AbstractChunk
    {
        public override int Execute(context.ExecContext context)
        {            
            object second_object=context.Pop();
            object first_object = context.Pop();
            Variable var = Variable.fromObject(first_object);
            var.add(second_object);
            context.Push(var);
            return getNextChunkOffset();
        }
    }
}
